import unittest, time
from HTMLTestRunner import HTMLTestRunner
from TestMyAllNum import TestMyAllNum
from TestMySplice import TestMySplice

if __name__ == '__main__':
    suite = unittest.TestSuite()
    # 加载类
    # 方法一
    testCase = unittest.TestLoader().loadTestsFromNames(['TestMyAllNum', 'TestMySplice'])
    # 方法二
    testCase1 = unittest.TestLoader().loadTestsFromTestCase(TestMyAllNum)
    testCase2 = unittest.TestLoader().loadTestsFromTestCase(TestMySplice)
    # suite.addTests(tests=testCase1)
    # suite.addTests(tests=testCase2)
    suite.addTests(tests=testCase)
    r = unittest.TestResult()
    suite.run(result=r)
    print(r.__dict__)
